//
// Created by wjc13 on 2017/8/5.
// 对顺序表基本实现的定义
//

#ifndef SQLIST_SQLIST_H
#define SQLIST_SQLIST_H

#include <stdio.h>
#include <stdlib.h>

#ifdef SQLIST_SQLIST_H
#define MAX_SIZE 10

#define True 1
#define False 0
//无法再分配内存
#define OVERFLOW -2
#endif

typedef int Status;
typedef int ElemType;

struct SqList {
    ElemType data[MAX_SIZE];
    int length;
};

Status InitList(struct SqList *L);

int ListLength(struct SqList L);

Status EmptyList(struct SqList *L);

Status InsertElem(struct SqList *L, int location, ElemType elem);

Status DeleteElem(struct SqList*, int, ElemType*);

Status GetElem(struct SqList L, int location,ElemType* elem);

int LocateElem(struct SqList L, ElemType elem);

Status IsListEmpty(struct SqList L);


#endif //SQLIST_SQLIST_H
